package com.yang.producer.controller;


import com.yang.producer.integration.Barista;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/output")
@Slf4j
public class OutputController {

    @Autowired
    Barista barista;

    public String outputTest() {
        barista.output().send(MessageBuilder.withPayload(123).build());
        log.info("发送数据：123");
        return "执行完成";
    }
}
